package com.jiazimall.member.controller;

import com.jiazimall.member.feign.CouponFeignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RefreshScope
@RestController
@RequestMapping("member/member")
public class MemberController {
    @Value("${member.user.name}")
    private String name;
    @Value("${member.user.age}")
    private String age;
    @GetMapping("/test/config")
    public void testConfig(){
        System.out.println(name+": "+age);
    }
    @Autowired
    CouponFeignService couponFeignService;
    @GetMapping("/test")
    public void test(){
        couponFeignService.memberCoupons();
    }
}
